from django.db import models


# Create your models here.

# # 表 一对多
# class Department(models.Model):
#     title = models.CharField(max_length=16)
#
#
# class UserInfo(models.Model):
#     name = models.CharField(verbose_name="姓名", max_length=16)
#     age = models.IntegerField(verbose_name="年龄")
#     email = models.CharField(verbose_name="邮箱", max_length=128, unique=True)
#     department_id = models.ForeignKey(to="Department", to_field="id", on_delete=models.CASCADE)
#
#
# # 表 多对多
# class Boy(models.Model):
#     name = models.CharField(verbose_name="姓名", max_length=16)
#
#
# class Girl(models.Model):
#     name = models.CharField(verbose_name="姓名", max_length=16)
#
#
# class B2G(models.Model):
#     bid = models.ForeignKey(verbose_name="男生id", to="Boy", to_field="id", on_delete=models.CASCADE)
#     gid = models.ForeignKey(verbose_name="nv生id", to="Girl", to_field="id", on_delete=models.CASCADE)
